package com.mail.dubbo.mapper;

import com.mail.model.db.UmsMenu;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 后台菜单表 Mapper 接口
 * </p>
 *
 * @author WJZ
 * @since 2022-06-20
 */
public interface UmsMenuMapper extends BaseMapper<UmsMenu> {

	/**
	 * 查询所有菜单列表
	 * @return
	 */
	@Select("select * from ums_menu;")
	List<UmsMenu> getAll();

	/**
	 * 修改菜单显示状态
	 * @param id
	 * @param hidden
	 * @return
	 */
	@Update("update ums_menu set hidden = #{hidden} where id = #{id};")
	Integer updateHiddenById(Long id, Integer hidden);
}
